package com.ymttest.database.sqlwapper;

import java.util.List;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtExpressSubscribeOrder;
import com.ymttest.utils.EnvSetup;

public class YmtExpressSubscribeOrderWapper {
	
	SqlManager manager;
	
	public YmtExpressSubscribeOrderWapper(){
		
		manager = new SqlManager("ymt" + EnvSetup.getEnv());
	}
	
	public YmtExpressSubscribeOrder selectByOrderid(int orderid)throws InterruptedException{
		List<YmtExpressSubscribeOrder> sub=  manager.getSelectResults(
				"com.ymttest.database.mapping.YmtExpressSubscribeOrderMapper.selectByOrderid", orderid);
		
		manager.commit();
		return sub.get(0);
		
	}


	public static void main(String[] args) {
		
		YmtExpressSubscribeOrderWapper test = new YmtExpressSubscribeOrderWapper();
		
		try {
			System.out.println(test.selectByOrderid(123321123).getOrderid());
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		// TODO Auto-generated method stub

	}

}
